<template>
    <div>
        <button @click="shu">竖</button>
        <button @click="heng">横</button>
        <button @click="da(true)">大</button>
        <button @click="da(false)">小</button>
        <input type="text" v-model="$store.state.textValue">
        <button @click="add">添加</button>
    </div>
</template>

<script>
    export default {
        name: "head1",
        data(){
            return{
            }
        },
        created() {
            console.log(this.$store.state.isShap)
        },
        methods:{
            shu(){
                // eslint-disable-next-line no-debugger
                this.$store.commit("newTape",true)
            },
            heng(){
                this.$store.commit("newTape",false)
            },
            da(type){
                this.$store.commit("newBig",type)
            },
            add(){
            this.$store.commit("add",{"title":this.$store.state.textValue,"id": this.$store.state.list.length+1})
            },
        }
    }
</script>

<style scoped>

</style>